/*=============================================================
* 	Copyright (C) 2024 USTC All rights reserved.
* 	
* 	filename : utils.h
* 	Author: Wei Jinsong
* 	Mail: vitus@mainl.ustc.edu.cn
* 	Date 2024-05-13
* 	Abstract 
* 		
*
=============================================================*/

#ifndef __UTILS_H__
#define __UTILS_H__

#include <string>
#include "systemc.h"

#define NAME(x) #x
#define LOG(x) cout << NAME(x) << ":" << x <<endl;

extern sc_trace_file* SC_TF;
extern std::string wave_file;

#define VCD
#ifdef VCD
#define SC_SIGNAL(X) (string(this->name())+"."+NAME(X))
#define SC_TRACE(X,S) sc_trace(SC_TF, X, S)
#define SC_TRACEX(X)  SC_TRACE(X,SC_SIGNAL(X))
#else
#define SC_SIGNAL(X) 
#define SC_TRACE(X,S)
#define SC_TRACEX(X) 
#endif


#endif

